package com.matrix.java.chap_03;

import java.util.Scanner;

/*
    对三个整數排序
 */
public class Ex3_08 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("输入三个整数: ");
        int num1 = input.nextInt();
        int num2 = input.nextInt();
        int num3 = input.nextInt();
        if (num1 < num2 || num1 < num3) {
            System.out.println(num1 + " " + num2 + " " + num3);
        } else if (num2 < num3) {
            System.out.println(num1 + " " + num2 + " " + num3);
        } else {
            int temp = num2;
            num2 = num3;
            num3 = temp;
            System.out.println(num1 + " " + num2 + " " + num3);
        }
    }
}
